import request from '@/config/axios'

export interface MemberMessageVO {
  messageId: number
  recordId: number
  sendMemId: number
  reciveMemId: number
  messageType: string
  messageContent: string
  messageStatus: number
}

// 查询相亲聊天记录列表
export const getMemberMessagePage = async (params) => {
  return await request.get({ url: `/blind/member-message/page`, params })
}

// 查询相亲聊天记录详情
export const getMemberMessage = async (id: number) => {
  return await request.get({ url: `/blind/member-message/get?id=` + id })
}

// 新增相亲聊天记录
export const createMemberMessage = async (data: MemberMessageVO) => {
  return await request.post({ url: `/blind/member-message/create`, data })
}

// 修改相亲聊天记录
export const updateMemberMessage = async (data: MemberMessageVO) => {
  return await request.put({ url: `/blind/member-message/update`, data })
}

// 删除相亲聊天记录
export const deleteMemberMessage = async (id: number) => {
  return await request.delete({ url: `/blind/member-message/delete?id=` + id })
}

// 导出相亲聊天记录 Excel
export const exportMemberMessage = async (params) => {
  return await request.download({ url: `/blind/member-message/export-excel`, params })
}
